package learn.builder.goodversion.killdemo;

/**
 * Created By  醉美柳舞之众星捧月
 *
 * @author 宋贤坤
 * @date 2019/3/18 13:55
 */
public class KillPeopleBuilder {
    private String makeGun;
    private String buyGunpowder;
    private String makeBullet;
    private String AssemblySomeGuns;
    private String Aim;
    private String killHead;

    @Override
    public String toString() {
        return "KillPeopleBuilder{" +
                "makeGun='" + makeGun + '\'' +
                ", buyGunpowder='" + buyGunpowder + '\'' +
                ", makeBullet='" + makeBullet + '\'' +
                ", AssemblySomeGuns='" + AssemblySomeGuns + '\'' +
                ", Aim='" + Aim + '\'' +
                ", killHead='" + killHead + '\'' +
                '}';
    }

    public KillPeopleBuilder(GoBuild build) {
        this.Aim = build.aim;
        this.makeGun = build.makeGun;
        this.killHead = build.killHead;
        this.makeBullet = build.makeBullet;
        this.buyGunpowder = build.buyGunPowder;
        this.AssemblySomeGuns = build.assemblySomeGuns;
    }

    public static class GoBuild {
        private String makeGun;
        private String buyGunPowder;
        private String makeBullet;
        private String assemblySomeGuns;
        private String aim;
        private String killHead;

        public GoBuild buildMakeGun(String makeGun) {
            this.makeGun = makeGun;
            return this;
        }

        public GoBuild buildBuyGunPower(String buyGunPowder) {
            this.buyGunPowder = buyGunPowder;
            return this;
        }

        public GoBuild buildMakeBullet(String makeBullet) {
            this.makeBullet = makeBullet;
            return this;
        }

        public GoBuild buildAssemblySomeGuns(String assemblySomeGuns) {
            this.assemblySomeGuns = assemblySomeGuns;
            return this;
        }

        public GoBuild buildAim(String aim) {
            this.aim = aim;
            return this;
        }

        public GoBuild buildKillHead(String killHead) {
            this.killHead = killHead;
            return this;
        }

        public KillPeopleBuilder build() {
            return new KillPeopleBuilder(this);
        }
    }
}
